{% extends "base.html" %}

{% block nav %}
<li class="active">
    <i class="fa fa-user"></i> 主机列表
</li>
{% endblock %}

{% block content %}
	<div class="col-lg-12">
		<div class="col-lg-10">
			<div class="panel panel-default ">
				<div class="panel-heading">主机列表 </div>
				<div class="panel-body">
					<table class="table table-striped">
					  <thead>
						<tr>
                        <th>主机ID</th>
						<th>应用名</th>
						<th>IP地址</th>
						<th>CPU</th>
						<th>MEM</th>
						<th>DISK</th>
						<th>机房</th>
						<th>机柜</th>
						<th>机位</th>
						<th>操作</th>
						</tr>
					  <thead>
					  <tbody>
					  {% if result %}
					  	{% if result['data'] %}
					  		{% for id,appliction,ip,cpu,mem,disk,room,cabinet,location in result['data'] %}
					  			<tr>
					  			<form action="/cmdb/del/host" method="POST">
								  <input type="hidden" name="id" value="{{ id }}" />
                                  <td > {{ id }}</td>
								  <td >{{ appliction }}</td>
								  <td >{{ ip }}</td>
								  <td >{{ cpu }}</td>
								  <td >{{ mem }}</td>
								  <td >{{ disk }}</td>
								  <td >{{ room }}</td>
								  <td >{{ cabinet }}</td>
								  <td >{{ location }}</td>
								  <td>
								  		<input class="btn btn-danger btn-sm" type="submit" value='册除' />
								 </form>
								  </td>
								</tr>
					  		{% endfor %}
					  	{% endif %}
					  {% endif %}
					  </tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
{% endblock %}
